package com.example.demo.config.constant;

/**
 * @Author: 聂吉泽
 * @Description:
 * @Date: create in 2021/11/9 11:55
 */
public enum ResponseCode {

    SUCCESS(200, "成功"),
    UNAUTHORIZED(401, "未授权"),
    FORBIDDEN(403, "禁止访问"),
    NOT_FOUND(404, "未找到该资源"),
    METHOD_NOT_ALLOWED(405,"不支持当前请求方法"),
    UNSUPPORTED_MEDIA_TYPE(415,"不支持当前媒体类型"),
    INTERNAL_SERVER_ERROR(500, "服务器内部错误!");

    private Integer code;
    private String message;

    ResponseCode(int code, String message) {
        this.code=code;
        this.message=message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

}
